$('#SaveRule').on('click', function () {
    var resume = $('#RuleResume').val();
    if (resume.length == 0) {
        $.messager.alert("错误提示", "请填写排除原因!", 'error');
    } else {
        var ajax = new $ax("/sds/sdscusmrlist/changestatus", function (data) {
            parent.postMessage("save", "*");
            // 等待3000ms（3秒）后执行下面这段代码
            setTimeout(function() {
                parent.layer.close(parent.layer.getFrameIndex(window.name)); //先得到当前iframe层的索引,再执行关闭
            }, 3000);
        }, function (data) {
            $.messager.alert("错误提示", "状态更新错误!", 'info');
        });
        ajax.set('mrListId', $("#mrListId").val());
        ajax.set('status', "O");
        ajax.set('resume', resume);
        ajax.set('execUser', $("#execUser").val())
        ajax.start();
    }
});